package com.zjj.learn.designmodel.pattern.decorator;

/**
 * *** @author zjj_admin
 * *** 2022/4/11 22:47
 */
public class Bacon extends Garnish {

    public Bacon(FastFood fastFood) {

        super(fastFood,2,"培根");
    }

    @Override
    public float cost() {
        return getPrice() + getFastFood().getPrice();
    }

    @Override
    public String getDesc() {
        return super.getDesc() + getFastFood().getDesc();
    }
}
